package com.hnkywl.sts.entity.xsgl;

import com.hnkywl.sts.entity.cggl.Jsd;
import com.hnkywl.sts.entity.htgl.Xsht;
import com.hnkywl.sts.entity.organ.Gsjg;
import com.hnkywl.sts.entity.sfgl.Sfk;
import com.hnkywl.sts.entity.shgl.Dlf;
import com.hnkywl.sts.entity.sys.Yg;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 计费明细
 * Created by HL on 2015/9/8.
 */
@Entity
@Table(name = "T_BIZ_JFMX")
public class Jfmx implements Serializable {
    @Id
    @SequenceGenerator(name = "seqJfmx", allocationSize = 1, sequenceName = "SEQ_BIZ_JFMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJfmx")
    private Long id;

    /**
     * 客户
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KH_ID")
    private Gsjg kh;

    /**
     * 销售合同
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSHT_ID")
    private Xsht xsht;

    /**
     * 销售单
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSD_ID")
    private Xsd xsd;


    /**
     * 销售单明细
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSDMX_ID")
    private Xsmx xsmx;


    /**
     * 收付款
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SFK_ID")
    private Sfk sfk;


    /**
     * 销售单明细
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "xsjsd_id")
    private Jsd jsd;

    /**
     * 重量
     */
    private Double zl;


    /**
     * 含税价，合同单价
     */
    private Double hsj;
    /**
     * 实际结算价
     */
    private Double sjjsj;

    /**
     * 购货金额
     */
    private Double ghje;
    /**
     * 资金分配金额
     */
    private Double zjfpje;
    /**
     * 客户付款时间（赎货时间）
     */
    private String khfksj;
    /**
     * 投资付款时间
     */
    private String tzfksj;

    //  实际占用天数
    private Double sjzyts;

    //  计算占用天数
    private String jszyts;

    /**
     * 代理费金额
     */
    private Double dlfje;

    /**
     * 贴息金额
     */
    private Double txje;

    /**
     * 贴息天数
     */
    private Double txts;

    /**
     * 赎货时间
     */
    private String shsj;
    /**
     * 创建时间
     */
    private Date created_date;

    /**
     * 是否结算
     */
    private Boolean sfjs = false;

    /**
     * 资金占用费
     */
    private Double zjzyf;

    /**
     * 优惠金额
     */
    private Double yhje;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="CREATEUSER_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yg createUser;

    public Yg getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Yg createUser) {
        this.createUser = createUser;
    }

    private Integer sffkdlf;

    public Integer getSffkdlf() {
        return sffkdlf;
    }

    public void setSffkdlf(Integer sffkdlf) {
        this.sffkdlf = sffkdlf;
    }

    public Double getTxts() {
        return txts;
    }

    public void setTxts(Double txts) {
        this.txts = txts;
    }

    public Double getYhje() {
        return yhje;
    }

    public void setYhje(Double yhje) {
        this.yhje = yhje;
    }

    public Double getZjzyf() {
        return zjzyf;
    }

    public void setZjzyf(Double zjzyf) {
        this.zjzyf = zjzyf;
    }

    public Boolean getSfjs() {
        return sfjs;
    }

    public void setSfjs(Boolean sfjs) {
        this.sfjs = sfjs;
    }

    public Double getZl() {
        return zl;
    }

    public void setZl(Double zl) {
        this.zl = zl;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Xsmx getXsmx() {
        return xsmx;
    }

    public void setXsmx(Xsmx xsmx) {
        this.xsmx = xsmx;
    }

    public Sfk getSfk() {
        return sfk;
    }

    public void setSfk(Sfk sfk) {
        this.sfk = sfk;
    }

    public Double getHsj() {
        return hsj;
    }

    public void setHsj(Double hsj) {
        this.hsj = hsj;
    }

    public Double getSjjsj() {
        return sjjsj;
    }

    public void setSjjsj(Double sjjsj) {
        this.sjjsj = sjjsj;
    }

    public Double getGhje() {
        return ghje;
    }

    public void setGhje(Double ghje) {
        this.ghje = ghje;
    }

    public Double getZjfpje() {
        return zjfpje;
    }

    public void setZjfpje(Double zjfpje) {
        this.zjfpje = zjfpje;
    }

    public String getKhfksj() {
        return khfksj;
    }

    public void setKhfksj(String khfksj) {
        this.khfksj = khfksj;
    }

    public String getTzfksj() {
        return tzfksj;
    }

    public void setTzfksj(String tzfksj) {
        this.tzfksj = tzfksj;
    }

    public Double getSjzyts() {
        return sjzyts;
    }

    public void setSjzyts(Double sjzyts) {
        this.sjzyts = sjzyts;
    }

    public String getJszyts() {
        return jszyts;
    }

    public void setJszyts(String jszyts) {
        this.jszyts = jszyts;
    }

    public Double getDlfje() {
        return dlfje;
    }

    public void setDlfje(Double dlfje) {
        this.dlfje = dlfje;
    }

    public Double getTxje() {
        return txje;
    }

    public void setTxje(Double txje) {
        this.txje = txje;
    }

    public String getShsj() {
        return shsj;
    }

    public void setShsj(String shsj) {
        this.shsj = shsj;
    }

    public Date getCreated_date() {
        return created_date;
    }

    public void setCreated_date(Date created_date) {
        this.created_date = created_date;
    }

    public Xsht getXsht() {
        return xsht;
    }

    public void setXsht(Xsht xsht) {
        this.xsht = xsht;
    }

    public Xsd getXsd() {
        return xsd;
    }

    public void setXsd(Xsd xsd) {
        this.xsd = xsd;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Gsjg getKh() {
        return kh;
    }

    public void setKh(Gsjg kh) {
        this.kh = kh;
    }

}
